package com.mytest.provider.qz.serviceImpl;

import com.mytest.provider.qz.service.TestService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

/**
 * @Author: llq
 * @Date: 2020/5/9
 */
@Service
public class TestServiceImpl implements TestService {


    //cron = "0/3 40 11 * * ?" 每天11:40触发，没三秒执行一次
//    @Scheduled(cron = "0/3 40 11 * * ?")
//    @Scheduled(cron = "*/5 * * * * ?")
    @Override
    public void test() {
  /*      String uuid = UUID.randomUUID().toString().replace("-", "");
        System.out.println("hello serive...."+uuid);*/

        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println("TestQuartz02----" + sdf.format(new Date()));
    }
}
